package com.cloud.drore.eboss.operation.entity.po;

import com.alibaba.fastjson.annotation.JSONField;
import com.cloud.drore.eboos.common.base.BaseEntity;
import com.cloud.drore.eboos.jackson.JacksonDateDeserializer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;


import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 浙江卓锐科技股份有限公司 版权所有  Copyright 2018<br>
 *
 * @Description: 分销商充值流水生成<br>
 * @Project: eboos <br>
 * @CreateDate: Created in 2018/1/24 0024 下午 4:42 <br>
 * @Author: <a href="410508961@qq.com">夏凯</a>
 */
@Data
public class FinaceFlowMeterPo extends BaseEntity<Long> {

    /**
     * 分销商id
     */
    @NotNull(message = "分销商id不能为空")
    @JsonProperty("distributor_id")
    @JSONField(name = "distributor_id")
    @ApiModelProperty(name = "distributor_id", notes = "分销商id", example = "1")
    private Long distributorId;


    /**
     * 分销商充值表id
     */
    @JsonProperty("recharge_record_id")
    @JSONField(name = "recharge_record_id")
    @ApiModelProperty(name = "recharge_record_id", notes = "分销商充值表id", example = "117")
    private Long rechargeRecordId;

    /**
     * 交易事件
     */
    @NotBlank(message = "交易事件不能为空")
    @JsonProperty("order_event_status")
    @JSONField(name = "order_event_status")
    @ApiModelProperty(name = "order_event_status", notes = "订单交易事件", example = "ACCOUNT_EVENT_STATUS")
    private String orderEventStatus;


    /**
     * 下单时间
     */
    @NotNull(message = "下单时间不能为空")
    @JsonDeserialize(using = JacksonDateDeserializer.class)
    @JsonProperty("order_produce_time")
    @JSONField(name = "order_produce_time", format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "order_produce_time", notes = "本次结算时间", example = "2018-1-24 16:36:24")
    private Date orderProduceTime;



    /**
     * 流水号
     */
    @NotBlank(message = "流水号不能为空")
    @JsonProperty("flow_num")
    @JSONField(name = "flow_num")
    @ApiModelProperty(name = "flow_num", notes = "流水号")
    private String flowNum;


    /**
     * 事件发生金额
     */
    @NotNull(message = "事件发生金额不能为空")
    @JsonProperty("event_amount")
    @JSONField(name = "event_amount")
    @ApiModelProperty(name = "event_amount", notes = "应事件发生金额", example = "400")
    private BigDecimal eventAmount;

    /**
     * 流水事件类型
     */
    @NotNull(message = "流水事件类型不能为空")
    @JsonProperty("event_type")
    @JSONField(name = "event_type")
    @ApiModelProperty(name = "event_type", notes = "流水事件类型", example = "0")
    private int eventType;


}
